/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DigiJoe;

import java.util.ArrayList;

public class Oscilloscope extends DigitalGate {

    private ArrayList<Sign> memory = new ArrayList<Sign>();
    
    public Oscilloscope(int MaxInputPort, int MaxOutputPort){
        super(MaxInputPort, MaxOutputPort);
    }

    public ArrayList<Sign> getMemory(){

        return memory;
    }
    
    @Override
    public void gateLogic() throws Exception{
         //ez ures ugysem hivodik meg soha
    }

    //ez a halozat gatelogikai utan hivodik majd
    public void getState() {
        for(int i =0 ; i<inputList.size(); i++ ){
            for(Wire input : inputList.get(i)){
            memory.add(input.getDigitalValue());
            }
         }
    }

    @Override
    public ElementType getType() {
        return ElementType.Oscilloscope;
    }

    public void reset() {
        memory.clear();
        memory.add(inputList.get(0).get(0).getDigitalValue());
    }

}